# Maintainer: Justin Davis <jrcd83@gmail.com>
# $Id: PKGBUILD 180376 2013-03-20 18:37:55Z eric $

pkgname=perl-try-tiny
pkgver=0.12
pkgrel=1
pkgdesc="Minimal try/catch with proper localization of \$@"
arch=(any)
license=(PerlArtistic GPL)
options=(!emptydirs)
makedepends=('perl-extutils-makemaker')
checkdepends=('perl-test-simple')
url="http://search.cpan.org/dist/Try-Tiny"
source=("http://search.cpan.org/CPAN/authors/id/D/DO/DOY/Try-Tiny-${pkgver}.tar.gz")
md5sums=('5b584cb5ace0a2f39d8949bacc800003')

build() {
  ( export PERL_MM_USE_DEFAULT=1 PERL5LIB=""                 \
      PERL_AUTOINSTALL=--skipdeps                            \
      PERL_MM_OPT="INSTALLDIRS=vendor"     \
      PERL_MB_OPT="--installdirs vendor" \
      MODULEBUILDRC=/dev/null

    cd Try-Tiny-${pkgver}
    /usr/bin/perl Makefile.PL
    make
  )
}

check() {
  ( export PERL_MM_USE_DEFAULT=1 PERL5LIB=""
    cd Try-Tiny-${pkgver}
    make test
  )
}

package() {
    cd Try-Tiny-${pkgver}
    make DESTDIR="$pkgdir" install
}

# Local Variables:
# mode: shell-script
# sh-basic-offset: 2
# End:
# vim:set ts=2 sw=2 et:
